package one;

import java.util.Date;

/*
one.Order（订单）类应包括以下属性：

id：订单ID
customer：顾客
book：购买的书籍
quantity：购买数量
date：购买日期
 */
public class Order {
    private int id;
    private Customer customer;
    private Book book;
    private int quantity;
    private Date date;

    public Order(int id, Customer customer, Book book, int quantity) {
        this.id = id;
        this.customer = customer;
        this.book = book;
        this.quantity = quantity;
    }

    public Order(int id, Customer customer, Book book, int quantity, Date date) {
        this.id = id;
        this.customer = customer;
        this.book = book;
        this.quantity = quantity;
        this.date = date;
    }

    // Getters and setters

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public Book getBook() {
        return book;
    }

    public void setBook(Book book) {
        this.book = book;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }
}